﻿#pragma once
#include "SRingGraphList.h"
#include "Components/Widget.h"
#include "URingGraphListUMG.generated.h"

UCLASS()
class URingGraphListUMG: public UWidget
{
	GENERATED_BODY()
public:
	URingGraphListUMG();
	
	//加载界面
	virtual TSharedRef<SWidget> RebuildWidget() override;
	//UMG列表栏
	virtual const FText GetPaletteCategory() ;
	
	//面板设置完毕后会触发此事件,字面的意思是同步属性
	virtual void SynchronizeProperties() override;
	//资源释放
	virtual void ReleaseSlateResources(bool bReleaseChildren) override;
	//更新信息
	
	UFUNCTION(BlueprintCallable, Category = "Appearance")
	void UpDataList(TMap<FString,int> ListData);
	UFUNCTION(BlueprintCallable, Category = "Appearance")
	void MySynchronizeProperties();
	//更新文本
	void UpDataText(FString str);
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "表格标题名字"))
	FString Title = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "圆心X"))
	int CenterX;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "圆心Y"))
	int CenterY;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "圆环宽度"))
	int LoopWidth;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "圆环距离圆心的距离"))
	int InsideDiameter;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "使用默认内外装饰环"))
	bool UseOtherLoop;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "显示圆内信息"))
	bool UseText;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "显示文字信息"))
	bool ShowTextInfo;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (ClampMin = 1, ClampMax = 100,DisplayName = "清晰度"))
	int Definition;
	//表格主体
	TSharedPtr<SRingGraphList> RingGraphList;
};
